const proxy = require('http-proxy-middleware');

module.exports = function (app) {
  app.use(
    proxy(
      '/v2/',
      {
        target: 'http://wx.jxc4.com/beta/v2',
        changeOrigin: true,
        pathRewrite: {
          '^/v2/': '/'
        }
      }
    )
  );
  app.use(
    proxy(
      '/eb/',
      {
        target: 'https://be.ele.me/crm',
        changeOrigin: true,
        pathRewrite: {
          '^/eb/': '/'
        }
      }
    )
  )
}


// https://be.ele.me/crm/getelecommentlist?start_time=2019-02-15 00:00:00&end_time=2019-02-22 23:59:59&reply_status=-1&level=3&page_num=1&page_count=20&supplier_id=2233065879
